# GAdmin-Rsync: Installer: Arch
# Contributor: Chris Giles <Chris.G.27 (at) Gmail.com>
# Update: Carbon Jiao <http://archlive-pkg.googlecode.com>

pkgname=gadmin-rsync-cn
_realpkgname=gadmin-rsync
pkgver=0.1.1
pkgrel=1
pkgdesc="An easy to use GTK+ frontend for the rsync backup client and server."
arch=('i686' 'x86_64')
url="http://www.gadmintools.org/"
license=('GPL')
depends=('gtk2' 'rsync' 'openssh')
provides=("gadmin-rsync=$pkgver")
options=(!emptydirs)
source=(http://mange.dynalias.org/linux/${_realpkgname}/${_realpkgname}-${pkgver}.tar.gz
        zh_CN.po
        ${_realpkgname}.desktop)
md5sums=('d20287878db88c07ea73fefbb8fa28c5')

build() {
	cd ${srcdir}/${_realpkgname}-${pkgver}

	# Build
	./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var --sbindir=/usr/sbin || return 1
	make || return 1
	make DESTDIR=${pkgdir}/ install

	# Desktop
	install -D -m755 ${srcdir}/${_realpkgname}.desktop ${pkgdir}/usr/share/applications/${_realpkgname}.desktop
	# 中文翻译
	msgfmt ${srcdir}/zh_CN.po -o ${_realpkgname}.mo
	install -m755 -d ${pkgdir}/usr/share/locale/zh_CN/LC_MESSAGES/
	cp -f ${_realpkgname}.mo $pkgdir/usr/share/locale/zh_CN/LC_MESSAGES/
}
